home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / pascal / tvtool2.zip / TVMENUS.INT < prev    next >
Text File  |  1993-07-20  |  1KB  |  69 lines

  1. UNIT TvMenus;
  2. {$B+}
  3. {$X+}
  4. {$V-}
  5.  
  6. {$I TVDEFS.INC}
  7.  
  8. INTERFACE
  9.  
  10.  
  11. USES
  12.   TvConst,
  13.   App,
  14.   Drivers,
  15.   Menus,
  16.   Views,
  17.   Objects;
  18.  
  19.  
  20. CONST
  21.   CheckMark     : String[10] = '√';
  22.   CheckMarkNull : String[10] = ' ';
  23.   CheckMarkLen  : Byte       = 1;
  24.  
  25.  
  26. TYPE
  27.   PbxMenuBar = ^TbxMenuBar;
  28.   TbxMenuBar = Object(TMenuBar)
  29.     Procedure ClearMarker(Cmd : Word);
  30.     Function  FindCmd(AMenu : PMenu;
  31.                       Cmd   : Word): PMenuItem;
  32.     Procedure HandleEvent(var E : TEvent);      Virtual;
  33.     Function  MarkerIsSet(Cmd : Word): Boolean;
  34.     Procedure ResetMarkers(FirstCmd : Word;
  35.                            LastCmd  : Word;
  36.                            NewCmd   : Word);
  37.     Procedure SetMarker(Cmd : Word);
  38.     Procedure ToggleMarker(Cmd : Word);
  39.   end;
  40.  
  41.  
  42. Function NewMarkedItem(Name, Param : TMenuStr;
  43.                        KeyCode     : Word;
  44.                        Command     : Word;
  45.                        AHelpCtx    : Word;
  46.                        Next        : PMenuItem): PMenuItem;
  47.  
  48. Function PopupMenu(PopMenu : PMenuBox): Word;
  49.  
  50. Function MousePopupMenu(PopMenu : PMenuBox): Word;
  51.  
  52.  
  53.  
  54. { TvMenu registration procedure }
  55.  
  56. Procedure RegisterTVMenus;
  57.  
  58.  
  59. { Stream Registration Records }
  60.  
  61. CONST
  62.   RbxMenuBar: TStreamRec = (
  63.     ObjType : 5250;
  64.     VmtLink : Ofs(TypeOf(TbxMenuBar)^);
  65.     Load    : @TbxMenuBar.Load;
  66.     Store   : @TbxMenuBar.Store
  67.   );
  68.  
  69.